.class public Lcom/instagram/android/e/b;
.super Landroid/os/AsyncTask;
.source "AddAvatarHelper.java"


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "Landroid/os/AsyncTask",
        "<",
        "Ljava/lang/Void;",
        "Ljava/lang/Void;",
        "Landroid/graphics/Bitmap;",
        ">;"
    }
.end annotation


# instance fields
.field final synthetic a:Lcom/instagram/android/e/a;

.field private final b:I

.field private c:Landroid/net/Uri;


# direct methods
.method public constructor <init>(Lcom/instagram/android/e/a;ILandroid/net/Uri;)V
    .locals 0
    .parameter
    .parameter
    .parameter

    .prologue
    .line 93
    iput-object p1, p0, Lcom/instagram/android/e/b;->a:Lcom/instagram/android/e/a;

    invoke-direct {p0}, Landroid/os/AsyncTask;-><init>()V

    .line 94
    iput p2, p0, Lcom/instagram/android/e/b;->b:I

    .line 95
    iput-object p3, p0, Lcom/instagram/android/e/b;->c:Landroid/net/Uri;

    .line 96
    return-void
.end method

.method private a()V
    .locals 3

    .prologue
    .line 129
    new-instance v0, Lcom/instagram/ui/a/a;

    iget-object v1, p0, Lcom/instagram/android/e/b;->a:Lcom/instagram/android/e/a;

    invoke-static {v1}, Lcom/instagram/android/e/a;->a(Lcom/instagram/android/e/a;)Lcom/instagram/android/login/b/ah;

    move-result-object v1

    invoke-virtual {v1}, Lcom/instagram/android/login/b/ah;->j()Landroid/support/v4/app/j;

    move-result-object v1

    invoke-direct {v0, v1}, Lcom/instagram/ui/a/a;-><init>(Landroid/content/Context;)V

    sget v1, Lcom/facebook/ba;->error:I

    invoke-virtual {v0, v1}, Lcom/instagram/ui/a/a;->b(I)Lcom/instagram/ui/a/a;

    move-result-object v0

    sget v1, Lcom/facebook/ba;->profile_picture_download_failed:I

    invoke-virtual {v0, v1}, Lcom/instagram/ui/a/a;->a(I)Lcom/instagram/ui/a/a;

    move-result-object v0

    sget v1, Lcom/facebook/ba;->dismiss:I

    new-instance v2, Lcom/instagram/android/e/c;

    invoke-direct {v2, p0}, Lcom/instagram/android/e/c;-><init>(Lcom/instagram/android/e/b;)V

    invoke-virtual {v0, v1, v2}, Lcom/instagram/ui/a/a;->a(ILandroid/content/DialogInterface$OnClickListener;)Lcom/instagram/ui/a/a;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/ui/a/a;->b()Landroid/app/Dialog;

    move-result-object v0

    invoke-virtual {v0}, Landroid/app/Dialog;->show()V

    .line 138
    return-void
.end method


# virtual methods
.method protected varargs a([Ljava/lang/Void;)Landroid/graphics/Bitmap;
    .locals 3
    .parameter

    .prologue
    .line 101
    :try_start_0
    iget-object v0, p0, Lcom/instagram/android/e/b;->a:Lcom/instagram/android/e/a;

    invoke-static {v0}, Lcom/instagram/android/e/a;->a(Lcom/instagram/android/e/a;)Lcom/instagram/android/login/b/ah;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/android/login/b/ah;->getContext()Landroid/content/Context;

    move-result-object v0

    iget v1, p0, Lcom/instagram/android/e/b;->b:I

    iget-object v2, p0, Lcom/instagram/android/e/b;->c:Landroid/net/Uri;

    invoke-static {v0, v1, v2}, Lcom/instagram/android/e/d;->a(Landroid/content/Context;ILandroid/net/Uri;)Landroid/graphics/Bitmap;

    move-result-object v1

    .line 102
    invoke-static {v1}, Lcom/instagram/n/a/a;->a(Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap;

    move-result-object v0

    .line 103
    if-eq v1, v0, :cond_0

    .line 104
    invoke-virtual {v1}, Landroid/graphics/Bitmap;->recycle()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 111
    :goto_0
    return-object v0

    .line 108
    :catch_0
    move-exception v0

    .line 109
    const-string v0, "AddAvatarHelper"

    const-string v1, "An error occurred fetching your image"

    invoke-static {v0, v1}, Lcom/facebook/e/a/a;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 111
    const/4 v0, 0x0

    goto :goto_0

    :cond_0
    move-object v0, v1

    goto :goto_0
.end method

.method protected a(Landroid/graphics/Bitmap;)V
    .locals 1
    .parameter

    .prologue
    .line 117
    iget-object v0, p0, Lcom/instagram/android/e/b;->a:Lcom/instagram/android/e/a;

    invoke-static {v0}, Lcom/instagram/android/e/a;->a(Lcom/instagram/android/e/a;)Lcom/instagram/android/login/b/ah;

    move-result-object v0

    if-eqz v0, :cond_0

    .line 118
    if-eqz p1, :cond_1

    .line 119
    iget-object v0, p0, Lcom/instagram/android/e/b;->a:Lcom/instagram/android/e/a;

    invoke-static {v0, p1}, Lcom/instagram/android/e/a;->a(Lcom/instagram/android/e/a;Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap;

    .line 120
    iget-object v0, p0, Lcom/instagram/android/e/b;->a:Lcom/instagram/android/e/a;

    invoke-static {v0}, Lcom/instagram/android/e/a;->a(Lcom/instagram/android/e/a;)Lcom/instagram/android/login/b/ah;

    move-result-object v0

    invoke-virtual {v0, p1}, Lcom/instagram/android/login/b/ah;->a(Landroid/graphics/Bitmap;)V

    .line 125
    :cond_0
    :goto_0
    invoke-super {p0, p1}, Landroid/os/AsyncTask;->onPostExecute(Ljava/lang/Object;)V

    .line 126
    return-void

    .line 122
    :cond_1
    invoke-direct {p0}, Lcom/instagram/android/e/b;->a()V

    goto :goto_0
.end method

.method protected synthetic doInBackground([Ljava/lang/Object;)Ljava/lang/Object;
    .locals 1
    .parameter "x0"

    .prologue
    .line 88
    check-cast p1, [Ljava/lang/Void;

    .end local p1
    invoke-virtual {p0, p1}, Lcom/instagram/android/e/b;->a([Ljava/lang/Void;)Landroid/graphics/Bitmap;

    move-result-object v0

    return-object v0
.end method

.method protected synthetic onPostExecute(Ljava/lang/Object;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 88
    check-cast p1, Landroid/graphics/Bitmap;

    .end local p1
    invoke-virtual {p0, p1}, Lcom/instagram/android/e/b;->a(Landroid/graphics/Bitmap;)V

    return-void
.end method

.method protected onPreExecute()V
    .locals 1

    .prologue
    .line 143
    iget-object v0, p0, Lcom/instagram/android/e/b;->a:Lcom/instagram/android/e/a;

    invoke-static {v0}, Lcom/instagram/android/e/a;->a(Lcom/instagram/android/e/a;)Lcom/instagram/android/login/b/ah;

    move-result-object v0

    if-eqz v0, :cond_0

    .line 153
    :cond_0
    invoke-super {p0}, Landroid/os/AsyncTask;->onPreExecute()V

    .line 154
    return-void
.end method
